<template>
  <div class="knowledge-list">
    <h2>知识库列表</h2>
    <div v-for="knowledge in knowledges" :key="knowledge.id" class="knowledge-item">
      <h3>{{ knowledge.title }}</h3>
      <p>{{ knowledge.content }}</p>
    </div>
  </div>
</template>

<script setup>
defineProps({
  knowledges: {
    type: Array,
    default: () => [],
  },
});
</script>

<style scoped>
.knowledge-list {
  width: 40%;
}

.knowledge-item {
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}
</style>
